// pages/settings/favorite/favorite.js
var util = require('../../../utils/util.js')
var app=getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataOtherUrl:"",
    count:1
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (option) {
    var that=this;
    var collectedId = option.collectedId;
    this.data.collectedId = collectedId;
    var dataOtherUrl = app.globalData.searchBase + "article/day?dev=1&date=" + this.data.collectedId;
    this.data.dataOtherUrl = dataOtherUrl;
    util.onRequest(dataOtherUrl, this.dealData);
  },
  dealData: function (data) {

    this.setData({
      title: data.data.title, 
      author: data.data.author,
      curr: data.data.date.curr
    });

  }

})